﻿using GroupProject.Adapters.Interfaces;
using GroupProject.Data;
using GroupProject.Data.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace GroupProject.Adapters.Adapters
{
    public class CoursesAdapter : ICoursesAdapter
    {
        public List<Course> GetAllCourses()
        {
            List<Course> model;
            using (ApplicationDbContext db = new ApplicationDbContext())
            {
                model = db.Courses.Include("Students").ToList();
            }
            return model;
        }
       
    }
}